<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- <script src="vue.js"></script> -->
  <script src="vue@2.6.js"></script>
  <title>Document</title>
</head>

<body>
  <div>
    <p>学到了组件渲染，这是视频搓的代码的最后一集，前面的mixins估计没录上，所以要自己写个mixins，写mergeOptions再写组件渲染</p>
  </div>
  <div id="app">
    <span>fqmyysjjd</span>
    <li>
      <span>{{ fqmyysjjd }}</span>
      <span>fqmyysjjd</span>
    </li>
    <span>fqmyysjjd</span>
  </div>

  <script>
    // let mixin1 = {
    //   data() {
    //     return {
    //       fqm: "fqmyysjjd",
    //     }
    //   }
    // }

    let vm = new Vue({
      el: "#app",
      // mixins: [mixin1],
      data() {
        return {
          fqm: "fqm",
          jj: {
            fqm: "fqm",
            yy: "yysjjd"
          }
        }
      },
      computed: {
        fqmyysjjd() {
          return this.fqm + this.jj.yy
        }
      },
      watch: {
        "fqm": {
          handler() {
            console.log("fqmyysjjd")
          }
        }
      }
    })

    setTimeout(() => {
      vm.fqm = "Fqm"
    }, 2000);

  </script>
</body>

</html>